A predictor model of treatment resistance in schizophrenia using data from electronic health records

Objectives To develop a prognostic tool of treatment resistant schizophrenia (TRS) in a large and diverse clinical cohort, with comprehensive coverage of patients using mental health services in four London boroughs. Methods We used the Least Absolute Shrinkage and Selection Operator (LASSO) for time-to-event data, to develop a risk prediction model from the first antipsychotic prescription to the development of TRS, using data from electronic health records. Results We reviewed the clinical records of 1,515 patients with a schizophrenia spectrum disorder and observed that 253 (17%) developed TRS. The Cox LASSO survival model produced an internally validated Harrel’s C index of 0.60. A Kaplan-Meier curve indicated that the hazard of developing TRS remained constant over the observation period. Predictors of TRS were: having more inpatient days in the three months before and after the first antipsychotic, more community face-to-face clinical contact in the three months before the first antipsychotic, minor cognitive problems, and younger age at the time of the first antipsychotic. Conclusions Routinely collected information, readily available at the start of treatment, gives some indication of TRS but is unlikely to be adequate alone. These results provide further evidence that earlier onset is a risk factor for TRS.


Introduction
Approximately 20-34% of patients with schizophrenia continue to experience persistent symptoms despite adequate treatment with at least two antipsychotic drugs, and are termed treatment resistant [1,2]. Treatment-resistance in schizophrenia (TRS) is associated with up to 11 times greater direct healthcare costs [3] and a delay in detection of TRS is associated with worse outcomes such as longer hospitalisation and delay in symptomatic improvement [4][5][6]. Therefore, early identification of TRS patients is a key priority [7], and modelling has shown that even modest predictive power may have clinical utility [8].
At present there is some evidence which indicates that TRS patients show abnormalities in glutamate transmission, comparatively normal dopamine transmission, and significant decreases in grey matter compared to treatment-responsive patients [9]. However, these abnormalities can only be detected using expensive and invasive brain scans, and have only modest predictive validity [10]. Genetic tests would be cheaper, but also lack predictive power [9]. In contrast, clinical and demographic information from electronic health records (EHRs) is readily available, non-invasive and inexpensive. A small number of previous studies have used clinical information to predict TRS. A recent systematic literature review of observational research [11] identified young age at illness onset as a robust predictor of TRS. In addition, other factors that were associated with TRS were psychiatric diagnosis, level of functioning, male gender, and season of birth. However, existing observational research has suffered from three main limitations. Firstly, studies using population registries have lacked detailed clinical information [12,13]. Secondly, studies that have investigated incident cases of psychosis longitudinally have been subject to significant attrition [1], therefore potentially not capturing service users who are most unwell. Thirdly, most studies have adopted traditional frequentist statistical approaches that are not optimised for prediction [11].
This study aimed to develop a prognostic tool of TRS in a large and diverse clinical cohort, with comprehensive coverage of patients using mental health services in a defined geographical area. To achieve this, we approximated as closely as possible the operationalized TRRIP [14] definition of TRS (which is a consensus guidelines that operationalise criteria for determining TRS, providing a benchmark for research, in view of previous inconsistencies in defining and measuring treatment resistance and response) and examined a range of possible predictors using clinically rich data from EHRs.

Setting
South London and Maudsley (SLAM) NHS Foundation Trust serves a geographic catchment of 1.36 million residents across four London boroughs (Lambeth, Southwark, Lewisham and Croydon). EHRs have been used by SLAM in all its services since 2006. In 2008, the Clinical Record Interactive Search (CRIS) system was developed [15,16], to allow researchers to search and retrieve anonymised SLAM EHRs, with over 450,000 cases currently represented in the system. The anonymisation process has been previously described in detail [15]. CRIS derives detailed information from both structured (i.e. drop-down menu) and freetext (i.e. clinical progress notes) fields from EHRs. The extraction of free-text information is facilitated by Natural Language Processing (NLP) applications [15,16], which consider the linguistic context within which words appear, therefore offering a more sophisticated approach to basic key word searches [16]. Where more complex judgements are required, anonymised text can be viewed by a researcher and manually coded.

Ethics statement
Ethical approval as an anonymised database for secondary analysis by the Oxford C Research Ethics Committee (18/SC/0372) [15,16]. The database operates on opt-out basis.

Cohort
Using structured and free-text data in CRIS, all patients who had a diagnosis of schizophrenia, schizotypal or delusional disorder (ICD-10 codes F20-F29) between 1 st January 2007 and 31 st December 2017; were prescribed antipsychotics in this period; and lived within the SLAM catchment area, or were homeless but receiving treatment from SLAM services, at the time of the prescription of their first antipsychotic medication, were identified.

Treatment resistant schizophrenia definition
A structured field for TRS was not available, and it was not possible to develop an NLP application that could parse the complex sequence of decisions required to arrive at a TRS diagnosis. Therefore, to determine the point at which a patient became TRS, we developed a bespoke algorithm to target potentially relevant EHRs, which were then manually examined. TRS was defined as evidence of failure to respond to two different antipsychotic prescriptions for six or more weeks, and a prescription of a third new antipsychotic. A six-week antipsychotic trial duration was chosen as a pre-requisite following NICE guidelines [17] and TRRIP TRS definition [14]. A patient was also classified as TRS, if one of their three antipsychotics was clozapine. In the UK almost all prescriptions of clozapine are for TRS-The British National Formulary, which provides the official national prescribing guidelines, lists only two indications for clozapine (1) Schizophrenia in patients unresponsive to, or intolerant of, conventional antipsychotic drugs; (2) Psychosis in Parkinson's disease. As our cohort did not include patients with the latter diagnosis we assumed that cases of clozapine was likely to be an indicator of TRS. Fig 1 illustrates the process of manually coding the antipsychotic treatment trials. All antipsychotic trials prescribed since 1/01/2007 were examined to determine if they were: 1) an adequate trial, lasting for at least six weeks (we assessed this by examining the first six weeks of EHRs following an antipsychotic prescription) and 2) a qualifying trial, meaning that antipsychotics were switched due to failure to respond as opposed to treatment non-adherence or treatment side-effects. To determine this we examined the EHRs for the six weeks before and after a medication switch. Where the reasons were unclear, if no evidence of switching medication due to non-adherence or side-effects was detected, then treatment failure was assumed to be the reason. For each patient, this process was repeated for all identified antipsychotic trials until TRS was identified or there were no further antipsychotics prescribed. S1 Fig summarises the decision-making process to identifying TRS.
Since manually coding case-notes was very time-consuming, taking approximately one hour per patient, it was not feasible to manually code all patients who met the inclusion criteria to determine their TRS status. Consequently, a random sample comprising 10% of all patients who met the above inclusion criteria was selected for manual coding. S2 Fig describes this process. Where the EHRs indicated that fewer than three antipsychotics were prescribed, the patient was coded as not treatment resistant (unless there was a prescription of clozapine). EHRs of patients where there was evidence of three or more antipsychotics being prescribed were examined in detail following the procedures outlined above.

Extraction of other data from CRIS
Data regarding all antipsychotic drugs listed in the British National Formulary (BNF) 65 [18] were extracted. Medication data were derived from structured fields, SLAM pharmacy records and free-text fields. Medication data from the free-text were extracted using General Architecture for Text Engineering (GATE) software [19], a suite of tools that facilitates the use of NLP applications and features. The NLP application used to extract antipsychotic medication has been validated previously [16,20,21]. Specific filters were applied to maximize precision and recall on instances of antipsychotic prescribing. For example, all instances of medication prescription that did not include a dose value were excluded at the point of data extraction.
Socio-demographic, socioeconomic, clinical and service use information was extracted within 3 months of the first antipsychotic date (also termed index date). Socio-demographic and socioeconomic variables included age, gender, ethnicity, and area-level deprivation index. Seventeen ethnic group categories were collapsed into "White" (including: British, Irish and other White Backgrounds), "Black" (including: African, Caribbean, White and Black African, White and Black Caribbean and any other Black background) and "Other" (including: Bangladeshi, Chinese, Indian, Pakistani, White and Asian, any other Asian background, any other mixed background, any other ethnic group or ethnicity not stated), due to small numbers in these categories. We used an area-level index of multiple deprivation, linked to the patients' post-code, as a proxy for socioeconomic status ascertained from 2007 UK Census [22]. In this case, multiple deprivation indices were applied to lower super output areas (LSOAs), which are the smallest enumeration unit, each containing on average 1,500 residents [22]. In addition, homelessness [23] was ascertained based on 'no fixed abode' codes.
Service use was ascertained by: the number of days where there were face-to-face contacts with outpatient services; number of days spent as an in-patient; patients were also classified into three categories depending on whether they were hospitalised at the time of the first antipsychotic prescription post 2007: not in hospital; compulsory admission under Mental Health Act 1983; or voluntary admission.

Statistical analyses
The analyses were done in R using the following packages: glmnet [26], caret [27], pROC [28], StatMatch [29], and c060 [30]. Model development, validation and presentation were conducted according to the guidelines outlined by Steyerberg et al [31] and to the Transparent Reporting of a multivariable prediction model for Individual Prognosis Or Diagnosis (TRI-POD) statement [32]. A survival analysis was conducted with TRS as the outcome. The date of the first antipsychotic prescribed on or after 1 st January 2007 was considered time zero. The end of the individual follow-up period was TRS date (the date on which the patient was switched to a third new antipsychotic due to non-response and/or was prescribed clozapine), date of death or 31 st December 2017, which ever occurred first.
The decision to use a statistical-learning method was determined by two factors: the need to maximise predictive power and minimise overfitting. Therefore, the Least Absolute Shrinkage and Selection Operator (Lasso [33])-a linear method automatically performing variable selection and more specifically the Lasso version of Cox regression [33] was chosen. We assessed whether our sample size was sufficient for a Cox model including our number of candidate predictor parameters, with our rate and mean follow-up years according to Riley and colleagues [34]. Missing data in the exposures were imputed with k-nearest neighbours (KNN [35]) imputation using the Gower distance [36]. In the model building for regularised regression the tuning parameter lambda for the Lasso models was estimated with 100-time repeated 10-fold cross-validation (CV). Tuning was done by minimising the partial likelihood deviance. The one-standard error (SE) rule model, which provides a better compromise between reliable variable selection and good prediction accuracy [37], was selected.
The model's discriminative performance was evaluated with Harrell's concordance index (C-index [38]). For an assessment of calibration, the calibration slope for Cox-Lasso model was returned [31]. Measures of positive predictive value (PPV; i.e. precision), negative predictive value (NPV), sensitivity and specificity at 1, 2, 5 and 10 years were estimated for the survival model using the Youden index [39] maximising the sum of sensitivity and specificity (giving the same importance to false positive and false negative errors) and the PPV was compared with the prevalence at each time point using a ratio (δ = PPV/prevalence). All measures of performance were internally validated using 100-time repeated 10-fold cross-validation optimism-correction as for Harrell [40].
The Lasso Cox model is presented as a nomogram [31]. The nomogram presents prognostic indexes (PI) [41], which are related to the corresponding survival probabilities at 1, 2, 5 and 10 years for ease of interpretation. Kaplan-Meier curves of the unadjusted TRS survival probabilities for levels of the selected variables are presented. Additionally, sensitivity analyses were performed to assess the robustness of the survival model prediction accuracy by excluding: 1) patients whose first antipsychotic date was in the first 3 months of 2007, in order to account for the possibility that this date was not a true reflection of when they began their antipsychotic treatment; 2) patients who died during the observation period.

Results
In total 15,129 patients met the inclusion criteria and the information for 1,515 patients was manually coded (a random 10% of the total cohort). Out of the patients who were manually coded, 627 were identified as having three or more antipsychotic medication prescriptions. Out of those cases, 206 (33%) were identified as TRS, 413 (66%) non-TRS, and 7 (1%) were not categorised due to lack of information. Data checking identified inconsistencies (observed in 5.2%), leading to changes in the TRS date of 1.4% of all manually coded cases, namely changing their TRS date. Out of the 888 patients with fewer than three antipsychotics recorded, 47 (5%) were prescribed clozapine and therefore categorised as TRS. The remaining patients were categorised as non-TRS (N = 841, 95%). Overall, 253 (17%) patients were identified as having TRS, 1,255 (83%) as non-TRS, and 7 (0.5%) did not have sufficient information to be categorised and were not included in the analysis.
The  Table 1 summarises the distribution of the exposure variables for the overall cohort and for those patients who were identified as TRS. The data contained 1044 (72.75%) complete cases, and the mean percentage of missing data per variable was 9.52% (SD 9.84, range 0-21.88%). S1 Table summarises the model performance. The internally validated estimate of C-index for Lasso-Cox regression was 0.60, indicating a weak prediction model. The validated calibration slope of 1.27 indicated that the Cox model was slightly underfitting and therefore underestimating risk for patients at high risk while overestimating for patients at low risk. The validated ratio δ between PPV and prevalence was always greater than one, reaching 1.69 at 2 Community face-to-face days pre-index 2 (1-4) 3 (1-5) 0 Community face-to-face days post index 4 (1-9) 5 (2-10) 0 Inpatient days pre-index 0 (0-1) 0 (0-1) 0 Inpatient days post index 0 (0-15.50) 0 (0-23) 0  Table 2 displays estimated Lasso coefficients for all 31 potential predictors (47 main effect parameters). Seven variables were selected as predictors of TRS in the Lasso-Cox model (corresponding to the 1 SE penalty): having more inpatient days in the three months before and after the first antipsychotic; having more community face-to-face clinical contact in the three months before the first antipsychotic; having a minor cognitive problem requiring no action    30-year-old patient, with Schizophrenia, having 34 inpatient days recorded at 3 months before the 1st antipsychotic (AP) date, 50 inpatient days recorded 3 months after 1st AP date, 15 community face-to-face days recorded 3 months before 1st AP date, having a minor problem requiring no action and having mood disorders as comorbidity, has a total point score of 78 + 33 + 28 + 6 + 18 + 10 + 0 = 173. This corresponds to a normalized prognostic index of 0.57 (linear predictor line) for TRS, meaning that the patient has a probability to become TRS at 1 year falling in the range 4.14%-7.66%, at 2 years falling in the range 7.62%-13.89%, at 5 years in the range 16.45%-28.74% and at 10 years in the range 26.57%-44.13% (see S3 Table).
https://doi.org/10.1371/journal.pone.0274864.g003 a linear combination of the risk factors, with the estimated regression coefficients as weights. The exponentiated PI gives the relative risk of each patient in comparison with a baseline patient. The PI is normalized by subtracting the mean PI. S3 Table further describes the normalized prognostic indexes (PI) for TRS translated into probabilities of developing TRS at 1, 2, 5 and 10 years. Appendix 1 describes how to compute the PI in further detail.
In total 361 patients were already taking antipsychotics at the time the EHRs database was established. These were included in the main analysis, but their date of first antipsychotic may have been before 1 Jan 2007. Therefore, we conducted a sensitivity analysis where we excluded patients with the first antipsychotic date within the first 3 months of 2007 (n = 361 excluded, see S4 Table). We also performed a sensitivity analysis excluding patients who died in the observation window (n = 168 excluded) (see S5 Table). Both sensitivity models performed less well than the full model in relation to validated discrimination and calibration, but the corrected C-indexes were similar across all three analyses, which supported the robustness of the full model and further suggests that the events of death and TRS are not competing risks (see S6 Table).

Discussion
Our results indicated that the best predictors of TRS were having a diagnosis of schizophrenia or schizoaffective disorder (as opposed to a diagnosis of other psychosis); more inpatient days (in the three months before and after the first antipsychotic); having more community face-toface clinical contact (in the three months before the first antipsychotic); having a minor cognitive problem requiring no action (as opposed to no problem or having a severe one); and younger age at the time of the first antipsychotic.
The prevalence of TRS was 17%, which is somewhat lower than previous studies in this field [1,12,42,43]. One possible explanation is the use of more stringent criteria for TRS than some previous studies. In line with existing NICE guidelines [17], our study pre-specified that an adequate trial had a minimum of six weeks, as opposed to other previous research, which has allowed trials of shorter duration [1]. Having a shorter antipsychotic trial would translate to patients being classified as TRS earlier in their treatment trajectory. Furthermore, while many studies have used proxies such as hospital admissions [12] to determine response to each antipsychotic, we manually rated response to ensure that each switch in antipsychotic medication was due to non-response as opposed to side-effects or non-adherence. This represents a more robust way of determining TRS, which is in line with TRRIP guidance [14].
Our results further indicated that the hazard of developing TRS was constant over a period of 10 years. This suggests that the probability of developing TRS does not stabilise over the course of patients' treatment trajectory. This is consistent with the findings of Wimberley et al [12], which also reported that the cumulative incidence of TRS (assessed by different indicators including 90-day polypharmacy), increased steadily over time, but does not seem to fit with data showing that the majority of TRS patients are treatment resistant from the outset [1,7]. However, both the current study and the Wimberley et al [12] study defined TRS from switches in antipsychotic initiated by clinicians, which in turn rely on clinicians recognising, and acting on, treatment failure. There is good evidence that the detection of TRS in clinical services is often delayed by months or years [44]. Thus, the data are compatible with a situation in which TRS develops early in many patients, but is only recognised by clinicians, and thus identified by our algorithm, months or years later.
With a C-statistic of 0.60, the prediction accuracy of the final model was not sufficient to be of clinical use alone. However, in line with existing literature [12,13,45,46], we found that socio-demographic, clinical and service use predictors of TRS were younger age at the illness onset, a diagnosis of other prolonged psychosis, and higher levels of service use, as measured by inpatient days and clinical face-to-face contacts. The identified predictors were robust and remained in sensitivity analyses, where we excluded patients whose prescription of the first antipsychotic was in the first three months of the observation window (which are more likely to be patients with prolonged psychosis); and patients who died between 01/01/2007 and 31/ 12/2017.
Younger age at onset is the most consistent risk factor identified to date for TRS [11], and this study provides further evidence in support of this. The presence of minor cognitive problems needing no action (an item on the HoNOS scale) was also associated with TRS. Other research has identified verbal intelligence and fluency as associated with TRS [47]. The fact that mild, but not more severe cognitive impairment was identified is consistent with clinical impressions that the level of cognitive impairment associated with schizophrenia is mild and generally does not require specific intervention. However, it is important to highlight here that what we report in this study is the patient's and clinician's perception of cognitive problems, as captured by HoNOS, as opposed to cognitive performance captured by standardised cognitive testing.
This study had several strengths. SLAM is one of Europe's largest mental health providers and is near-universal provider of mental health care in its geographical area. Therefore, we were able to capture a large and representative sample of patients who receive national health care provision in this area. In addition, CRIS is a longitudinal data source, which encompasses clinical information from both structured and free-text fields from both inpatient and outpatient clinical settings. This enabled us to investigate TRS over a ten-year period and examine rich and diverse clinical information and therefore a wide range of possible predictors. Furthermore, our analyses were conducted on a manually coded dataset, which not only identified antipsychotic episodes in accordance with existing clinical guidelines [14], but was also able to determine reasons for switching, something that has been problematic in previous research.
There are several potential limitations that need to be considered when interpreting our findings. It is possible that our definition of TRS, which required both failed trials of antipsychotics to exceed six weeks duration, could have led to underestimating TRS cases. Less than six weeks may be adequate in some cases to establish non-response, and such trials were not counted in our algorithm. On the other hand, employing a stricter criterion to establishing TRS arguably ensures that fewer false positive cases were detected. In addition, we did not consider antipsychotic dose in assessing the adequacy of the antipsychotic trials and further research could explore the role of this on the time it takes for a patient to become TRS. The present study only considered medication trials from 01/01/2007 onwards. Consequently, some individuals may have become TRS earlier than the date identified. In relation to psychiatric diagnosis of the service users in this cohort, we included individuals who had schizophrenia, schizoaffective and other prolonged psychosis diagnosis due to the low number of patients diagnosed with schizophrenia at their illness onset, which is likely to reflect a reluctance to diagnose people with schizophrenia early in their illness. Furthermore, the prescription of the first antipsychotic from 01/01/2007 was not necessarily the patients' first treatment, we minimised this by discounting all patients who appeared to have their first antipsychotic prescription in the first three months of the database (01/01/07-30/03/07) in the sensitivity analyses. We were only able to include factors, which were recorded in the clinical notes and had sufficient information present to allow us to include in the models. Therefore, we were unable to include potential predictors, such as smoking, due to large number of missing data. Lastly, it is important to note that inpatient days/clinical events/clinical contacts may not be constant throughout treatment (there may be periods of higher contact, namely at illness onset and around TRS date). Therefore, if a patient became TRS close to the start of the observation period (01/01/2007), this patient might be receiving frequent contact over the limited followup period and would appear to be a more frequent user of services than someone who became TRS later.
Our findings have potential implications for further clinical research. With a C-statistic of 0.60, our model has insufficient predictive power to be clinically useful in isolation, but it is possible that the risk factors identified here could be incorporated into a multivariate model including information from biomarkers, such as neuroimaging or genetic markers [10]. Moreover, the internally validated PPV for the survival model predicting TRS at each time point was larger than the prevalence at the same time point. Therefore, if one were to use this model as a stratification tool to identify patients with a higher chance of developing TRS, for example when recruiting patients for an RCT, fewer patients would be needed to yield a similar amount of TRS patients. For example, a trial recruiting patients identified as having a high probability of TRS by the model will yield 1.69 times as many TRS patients in 2 years than a trial recruiting unselected patients. It will therefore need to recruit 41% fewer patients to obtain a given number of TRS patients at 2 years. In relation to further research, the external validity of the model examined here can be further tested by replicating the study on a similar cohort from other settings. In conclusion, routinely collected information, readily available at the start of treatment, gives some indication of TRS but is unlikely to be adequate alone. Future studies that develop clinical risk prediction tools can combine these predictors with other identified predictors, which will increase the likelihood of success. In addition, further work investigating the biological underpinnings would be extremely useful.